const USER_INFO_KEY = 'USER_INFO'
type UserInfoType = {
  id: string
  name: string
}
const USER_INFO_UTILS = {
  setUserInfo: (userInfo: UserInfoType) => {
    localStorage.setItem(USER_INFO_KEY, JSON.stringify(userInfo))
  },
  getUserInfo: () => {
    return JSON.parse(localStorage.getItem(USER_INFO_KEY) || '')
  },
  removeUserInfo: () => {
    localStorage.removeItem(USER_INFO_KEY)
  },
}
export default USER_INFO_UTILS
